using Microsoft.EntityFrameworkCore;
using Soft1ApiDemo.Domain.Entity;
using softDemo.Demain.log;
using softDemo.Demain.Product;
using softDemo.Demain.User;
namespace softDemo.basic.Db
{
    public class DbSoft : DbContext
    {
        public DbSet<User> Users { get; set; }
        public DbSet<Product> Products { get; set; }

        public DbSet<Log> Log { get; set; }
        public DbSet<AuditLog> autLog { get; set; }
        public DbSet<UploadFileInfo> uploadFileInfo { get; set; }

        // 有参构造函数
        public DbSoft(DbContextOptions<DbSoft> options) : base(options) { }
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            var str = "uid =sa;pwd=123456;database=MyInformation;server=.";
            optionsBuilder.UseSqlServer(str);

        }
    }
}